<template>
  <view class="not-all">
    <u-empty
      :text="description"
      icon="https://cdn-prod.findapet.com.cn/empty.png"
    ></u-empty>
    <view
      class="back-btn"
      @click="backChange"
    >
      返回
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      description: '',
    };
  },
  onLoad(options) {
    console.log('options', options);
    const descript = options.descript;
    this.description = descript;
  },
  methods: {
    backChange() {
      const pages = getCurrentPages();
      if (pages.length > 1) {
        uni.navigateBack();
      } else {
        uni.redirectTo({
          url: '/pages/index/index',
        });
      }
    },
  },
};
</script>

<style lang="scss">
.not-all {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100vh;
  .back-btn {
    margin: 30px 28px;
    background-color: #ffcf58;
    border-color: #ffcf58;
    color: #2b2b2b;
    padding: 15px 15px;
    box-sizing: border-box;
    border-radius: 25px;
    text-align: center;
  }
}
</style>
